package com.greensam.pixelengine.exception;

import lombok.Getter;

/**
 * 结果码定义，前三位是错误码，最后一位可扩展
 *
 * @author Macro_Ray
 * @since 2025/6/13 13:43
 */
@Getter
public enum ResultCode {

    SUCCESS(0, "成功"),

    NOT_FOUND(4040, "未找到"),

    BAD_REQUEST(4000, "请求错误"),

    NO_AUTH_ERROR(4010, "未授权"),

    NOT_LOGIN_ERROR(4011, "未登录"),

    FORBIDDEN(4030, "禁止访问"),

    FAILED(5000, "服务器错误"),

    OPERATION_ERROR(5010, "操作失败"),

    SERVICE_UNAVAILABLE(5030, "服务不可用"),
    ;

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
